<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>v-model补充</title>
    <script src="../../js/vue3.js"></script>
    <style>
        #app {
            margin: 2rem auto;
            width: 50%;
            text-align: center;
        }
        
        p {
            font-size: 1.5rem;
            font-weight: bold;
        }
    </style>
</head>

<body>
    <div id="app">
        <p><input type="text" v-model.lazy="str_1"></p>
        <p>{{str_1}}</p>
        <p><input type="text" v-model.num="str_2"></p>
        <p>{{str_2}}</p>
        <p><input type="text" v-model.trim="str_3"></p>
        <p>{{str_3}}</p>
      
    </div>
    <script>
        const v_app = Vue.createApp({
            data() {
                return {
                   str_1:"1",
                   str_2:"2",
                   str_3:"3",
                }
            }
        });
        v_app.mount("#app");
    </script>
</body>

</html>